﻿@using Status = Caltech.Service.Common.Status;
@using Role = Caltech.Service.Common.Roles;
@using Areas = Caltech.Service.Common.Areas;
@using ServicePlace = Caltech.Service.Common.ServicePlace;
@Html.Partial("_Menu")
<div class="container body-content">
    <div ui-view class="ui-container"></div>
    <toaster-container toaster-options="{'time-out': 3000, 'close-button':true}"></toaster-container>
</div>


@section Scripts
{
    <script type="text/javascript">
        angular.module('Caltech.Constants', [])
            .constant('Constants', {
                accountInfo: @Html.Raw(ViewBag.Account)
                })
            .constant('moment', moment)
            .constant('CurrentRole', '@ViewBag.RoleName')
            .constant('Statuses', @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Enum.GetValues(typeof(Status)).Cast<object>()
                        .Select(enumValue => new { text = enumValue.ToString(), value = (int)enumValue }))) )
            .constant('Areas', @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Enum.GetValues(typeof(Areas)).Cast<object>()
                        .Select(enumValue => new { text = enumValue.ToString(), value = (int)enumValue }))) )
            .constant('Roles', @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Enum.GetValues(typeof(Role)).Cast<object>()
                        .Select(enumValue => new { text = enumValue.ToString(), value = (int)enumValue }))) )
            .constant('ServicePlaces', @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Enum.GetValues(typeof(ServicePlace)).Cast<object>()
            .Select(enumValue => new { text = enumValue.ToString(), value = (int)enumValue }))) );
    </script>

    @Scripts.Render("~/Scripts/app")
}